#include <iostream>
using namespace std;

int a1=2;
int d=3;
int main()
{
	int n;
	while( cin >> n )
	{
		cout << n * a1 + n * ( n - 1 ) /2 * d ;
		cout<<endl;
	}
} 
